<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>查看到货单</title>
<link href="<%=path%>/css/core.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/form.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/list.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/xWindowPanel.css" rel="stylesheet"
	type="text/css" />
<link href="<%=path%>/css/xToolbar.css" rel="stylesheet" type="text/css" />
<style type="text/css">
input {
	width: 180px;
}

textarea {
	width: 503px;
	height: 40px;
}

select {
	width: 188px;
}

.n {
	text-align: right;
}

.required {
	color: red;
}
</style>
</head>
<body>
	<s:if test="inOrder.auditState == 2">
		<div id="toolbar"></div>
	</s:if>
	<div class="form-group">基本信息</div>
	<table class="form-table" cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<td class="form-left"><span class="form-required">*</span>入库单号</td>
			<td class="form-right"><s:property value="inOrder.code" /></td>
			<td class="form-left"><span class="form-required">*</span>入库时间</td>
			<td class="form-right"><s:date name="inOrder.inStockDate"
					format="yyyy-MM-dd" /></td>
		</tr>
		<tr>
			<s:if test="inOrder.arriveOrder.code != ''">
				<td class="form-left">到货日期</td>
				<td class="form-right"><s:date
						name="inOrder.arriveOrder.orderDate" format="yyyy-MM-dd" />
				</td>
				<td class="form-left">到货单号</td>
				<td class="form-right"><s:property
						value="inOrder.arriveOrder.code" />
				</td>
			</s:if>
			<s:else>
				<td class="form-left">退货日期</td>
				<td class="form-right"><s:date
						name="inOrder.salesBackOrder.backDate" format="yyyy-MM-dd" />
				</td>
				<td class="form-left">退货单号</td>
				<td class="form-right"><s:property
						value="inOrder.salesBackOrder.code" />
				</td>
			</s:else>
		</tr>
		<tr>
			<td class="form-left">经办人</td>
			<td class="form-right" colspan="3"><s:property
					value="inOrder.creator.realName" />
			</td>
		</tr>
		<tr>
			<td class="form-left">备注</td>
			<td class="form-right" colspan="3"><s:property
					value="inOrder.remark" />
			</td>
		</tr>
	</table>
	<div class="form-group">入库明细</div>
	<table id="titleTable" cellpadding="0" cellspacing="0">
		<tr>
			<td>货品编号</td>
			<td>货品名称</td>
			<td>规格型号</td>
			<td>到货数量</td>
			<td>仓库选择</td>
			<td><span class="form-required">*</span>入库数量</td>
		</tr>
	</table>
	<div style="overflow-y: scroll; height: 160px">
		<table id="dataTable" cellpadding="0" cellspacing="0">
			<s:iterator id="iop" value="iopList" status="i">
				<tr class="row">
					<td><span><s:property value="#iop.product.code"
								default="&nbsp;" /> </span>
					</td>
					<td><span><s:property value="#iop.product.name"
								default="&nbsp;" /> </span>
					</td>
					<td><span><s:property value="#iop.product.standard"
								default="&nbsp;" /> </span>
					</td>
					<td align="right"><span><s:property
								value="#iop.arriveAmounts" default="&nbsp;" /> </span>
					</td>
					<td align="right"><span><s:property
								value="#iop.wareHouse.name" default="&nbsp;" /> </span>
					</td>
					<td align="right"><span><s:property
								value="#iop.inAmounts" default="&nbsp;" /> </span>
					</td>
				</tr>
			</s:iterator>
		</table>
	</div>
	<script src="<%=path%>/js/core.js" type="text/javascript"></script>
	<script src="<%=path%>/js/jquery.js" type="text/javascript"></script>
	<script src="<%=path%>/js/Grid.js" type="text/javascript"></script>
	<script src="<%=path%>/js/jquery-impromptu.js" type="text/javascript"></script>
	<script src="<%=path%>/js/xToolbar.js" type="text/javascript"></script>
	<script src="<%=path%>/js/xToolbar.items.js" type="text/javascript"></script>
	<script type="text/javascript">
		var grid;

		$(document).ready(function() {
			new Toolbar({
				renderTo : 'toolbar',
				icon : '../../image/op.gif',
				border : 'both',
				items : [ {
					type : 'button',
					text : '打印',
					tip : '打印入库单',
					useable : 'T',
					position : {
						a : '0px 0px',
						b : '0px -120px'
					},
					handler : function() {
					}
				} ]
			});
			grid = new Grid({
				titleTable : 'titleTable',
				dataTable : 'dataTable',
				widths : [ 160, 100, 100, 80, 90, 80 ],
				height : 290
			});

			loadReady();
		});
	</script>
</body>
</html>